package top.kaoshanji.ch02;

import javax.swing.*;
import java.awt.*;

/**
 * author kaoshanji
 * ^_^
 * create time 2024/11/16 10:15
 */
public class HelloComponent1 extends JComponent {

    String theMessage;

    public HelloComponent1(String theMessage) {
        this.theMessage = theMessage;
    }

    @Override
    protected void paintComponent(Graphics g) {
        g.drawString("Hello, Java!", 125, 95);
    }
}
